home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / src / GLperf3.12-src.lha / GLperf / DrawPix.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-01  |  4.7 KB  |  142 lines

  1. /*
  2.  * (c) Copyright 1995, Silicon Graphics, Inc.
  3.  * ALL RIGHTS RESERVED
  4.  * Permission to use, copy, modify, and distribute this software for
  5.  * any purpose and without fee is hereby granted, provided that the above
  6.  * copyright notice appear in all copies and that both the copyright notice
  7.  * and this permission notice appear in supporting documentation, and that
  8.  * the name of Silicon Graphics, Inc. not be used in advertising
  9.  * or publicity pertaining to distribution of the software without specific,
  10.  * written prior permission.
  11.  *
  12.  * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
  13.  * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
  14.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
  15.  * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
  16.  * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
  17.  * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
  18.  * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
  19.  * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
  20.  * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
  21.  * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
  22.  * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
  23.  * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
  24.  *
  25.  * US Government Users Restricted Rights
  26.  * Use, duplication, or disclosure by the Government is subject to
  27.  * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
  28.  * (c)(1)(ii) of the Rights in Technical Data and Computer Software
  29.  * clause at DFARS 252.227-7013 and/or in similar or successor
  30.  * clauses in the FAR or the DOD or NASA FAR Supplement.
  31.  * Unpublished-- rights reserved under the copyright laws of the
  32.  * United States.  Contractor/manufacturer is Silicon Graphics,
  33.  * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
  34.  *
  35.  * Author: John Spitzer, SGI Applied Engineering
  36.  *
  37.  */
  38.  
  39. #if (defined(INC_REASON)) && (INC_REASON == INFO_ITEM_STRUCT)
  40. #include "RastrPos.h"
  41.     int drawPixelsWidth;
  42.     int drawPixelsHeight;
  43.     /* Variables below this line aren't user settable */
  44.     int subImage;
  45.     /* Member functions */
  46.     /* void Initialize(TestPtr); */               /* virtual function */
  47.     /* void Execute(TestPtr);   */                /* virtual function */
  48.     /* int SetState(TestPtr);  */                 /* virtual function */
  49.     /* float PixelSize(TestPtr);  */              /* virtual function */
  50.     /* int TimesRun(TestPtr);  */               /* virtual function */
  51.     /* void (*SetExecuteFunc)(TestPtr); */        /* virtual function */
  52.     Image image_DrawPixels;
  53.     TransferMap transfermap_DrawPixels;
  54.     Zoom zoom_DrawPixels;
  55. #elif (defined(INC_REASON)) && (INC_REASON == INFO_ITEM_ARRAY)
  56. #include "RastrPos.h"
  57. #undef offset
  58. #define offset(v) offsetof(DrawPixels, transfermap_DrawPixels)+offsetof(TransferMap, v)
  59. #include "TransMap.h"
  60. #undef offset
  61. #define offset(v) offsetof(DrawPixels, zoom_DrawPixels)+offsetof(Zoom, v)
  62. #include "Zoom.h"
  63. #undef offset
  64. #define offset(v) offsetof(DrawPixels, image_DrawPixels)+offsetof(Image, v)
  65. #include "Image.h"
  66. #undef offset
  67. #define offset(v) offsetof(DrawPixels,v)
  68.     {
  69.         DrawPixelsWidth,
  70.         "Width of DrawPixels",
  71.         offset(drawPixelsWidth),
  72.         RangedInteger,
  73.         {
  74.             { 1 },
  75.             { 2048 },
  76.         },
  77.         { -1 }
  78.     },
  79.     {
  80.         DrawPixelsHeight,
  81.         "Height of DrawPixels",
  82.         offset(drawPixelsHeight),
  83.         RangedInteger,
  84.         {
  85.             { 1 },
  86.             { 2048 },
  87.         },
  88.         { -1 }
  89.     },
  90.     {
  91.         0
  92.     }
  93.  
  94. #else  /* INC_REASON not defined, treat as plain include */
  95. #ifndef _DrawPix_h
  96. #define _DrawPix_h
  97.  
  98. #include "RastrPos.h"
  99. #include "Image.h"
  100. #include "TransMap.h"
  101. #include "Zoom.h"
  102. #include "General.h"
  103. #include "TestName.h"
  104. #include "PropName.h"
  105. #include "Global.h"
  106. #include "AttrName.h"
  107. #ifdef WIN32
  108. #include <windows.h>
  109. #endif
  110. #include <GL/gl.h>
  111. #include <GL/glu.h>
  112. #include "Random.h"
  113. #include "FuncEnum.h"
  114.  
  115. typedef struct _DrawPixels {
  116. #define INC_REASON INFO_ITEM_STRUCT
  117. #include "DrawPix.h"
  118. #undef INC_REASON
  119. } DrawPixels, *DrawPixelsPtr;
  120.  
  121. DrawPixelsPtr new_DrawPixels();
  122. void delete_DrawPixels(TestPtr);
  123. void DrawPixels__AddTraversalData(DrawPixelsPtr);
  124. int DrawPixels__SetState(TestPtr);
  125. void DrawPixels__Initialize(TestPtr);
  126. void DrawPixels__Cleanup(TestPtr);
  127. void DrawPixels__SetExecuteFunc(TestPtr);
  128. TestPtr DrawPixels__Copy(TestPtr);
  129. float DrawPixels__Size(TestPtr);
  130. int DrawPixels__TimesRun(TestPtr);
  131. void DrawPixels__CreateImageData(DrawPixelsPtr);
  132.  
  133. /* These constants are used in the function enumeration scheme */
  134. #define NONE 0
  135. #define PER_VERTEX 1
  136. #define PER_FACET 2
  137. #define CI 0
  138. #define RGB 1
  139.  
  140. #endif /* file not already included */
  141. #endif /* INC_REASON not defined */
  142.